<?php

namespace common\traits;

use Yii;

/**
 * User base info relations of Constants
 *
 * @author emhome
 * @since 2.0
 */
trait User {

    /**
     * 用户基本信息
     * @return user
     */
    public function getUser() {
        return $this->hasOne(Yii::$app->user->identityClass, ['id' => 'user_id']);
    }

}
